/*
 * @authors :Bin Mei
 * @date    :2017-08-09
 * @description：票交汇App - Account- 账户首页
 */

import { StaticToast} from 'pjh-mobile-ui';
import { mFetch} from 'min-bridge';

export const  ACCOUNT_HOME = "ACCOUNT_HOME";


let account =  {
	//初始化接口，
	account_home:(options)=>{
		return (dispatch)=>{
			let {data} = options||{};
			mFetch.fetchJson({
				data:{
					method:"account.home",
					bizContent:{}
				},
				success:res=>{
					console.log(res);
					if(res.code == "0000"){
						let {data}=res;
						dispatch({
							type:ACCOUNT_HOME,
							data:(data||{})
						});
					}else{
						StaticToast.error(res.message);
					}
				},
			});

		};
	}
	
	
};
export default account;


